#!/bin/bash
if [ ! -x /opt/hifiberry/bin/write-status ]; then
 exit
fi

if [ "$PLAYER_EVENT"  == "stop" ]; then
 /opt/hifiberry/bin/write-status STOP SPOTIFY
 exit 
fi
if [ "$PLAYER_EVENT"  == "start" ]; then
 /opt/hifiberry/bin/write-status START SPOTIFY
fi
if [ "$TRACK_ID" != "" ]; then
 /opt/hifiberry/bin/write-status TRACK SPOTIFY $TRACK_ID
fi

